#ifndef __DHT11_H
#define __DHT11_H 
 
#include "my_func.h"
 
//Set GPIO Direction
#define DHT11_IO_IN()  {GPIOB->CRH&=0XFFF0FFFF;GPIOB->CRH|=8<<16;}   
#define DHT11_IO_OUT() {GPIOB->CRH&=0XFFF0FFFF;GPIOB->CRH|=3<<16;}   
                                               
#define DHT11_DQ_OUT PBout(12) 
#define DHT11_DQ_IN  PBin(12)   

u8 DHT11_Init(void); //Init DHT11
u8 DHT11_get_data(u8 *temperature,u8 *humidity); //Read DHT11 Value
u8 DHT11_Read_Byte(void);//Read One Byte
u8 DHT11_Read_Bit(void);//Read One Bit
u8 DHT11_Check(void);//Chack DHT11
void DHT11_Rst(void);//Reset DHT11    
u8 dht11_get_tmp(void);
u8 dht11_get_hum(void);

#endif
